package com.bh.extend.vo;

import com.bh.common.annotation.Dict;
import com.bh.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.poi.ss.usermodel.HorizontalAlignment;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 客户单价对象 jc_customer_price
 *
 * @author slx
 * @date 2023-04-03
 */
@Data
public class JcCustomerPriceVo {

    /**
     * 客户ID
     */
    @Excel(name = "编号(更新价格必填)")
    private Long id;

    /**
     * 客户ID
     */
    @Dict(dictTable = "jc_customer", dictLabel = "name", dictValue = "id", dictAlias = "customerName")
    @ApiModelProperty(value = "客户ID", hidden = true)
    private Long customerId;

    /**
     * 客户ID
     */
    @NotBlank(message = "客户名称不能为空")
    @Excel(name = "客户名称", align = HorizontalAlignment.LEFT)
    private String customerName;

    /**
     * 用于导出和查询
     */
    @Dict(dictTable = "jc_sys_organization", dictLabel = "name", dictValue = "id", dictAlias = "fromOrgName")
    private Long fromOrg;

    /**
     * 出发网点
     */
    @NotBlank(message = "出发网点不能为空")
    @Excel(name = "出发网点")
    private String fromOrgName;

    public String getFromOrgName() {
        return fromOrgName.trim().replaceAll("，",",");
    }


    private Long fromServerZoneId;

    /**
     * 出发运点
     */
    @NotBlank(message = "出发运点不能为空")
    @Excel(name = "出发运点", prompt = "必须是 昆明市,呈贡区(县),大渔街道(乡镇) 相似的格式，从 州市 一级开始，使用英文逗号隔开,如果地址是到乡镇，则必须到乡镇级别，数据参考 系统内行政区划")
    private String fromServerZoneIdName;

    public String getFromServerZoneIdName() {
        return fromServerZoneIdName.trim().replaceAll("，", ",");
    }


    /**
     * 用于导出和查询
     */
    @Dict(dictTable = "jc_sys_organization", dictLabel = "name", dictValue = "id", dictAlias = "toOrgName")
    private Long toOrg;
    /**
     * 目的网点
     */
    @Excel(name = "目的网点")
    private String toOrgName;

    public String getToOrgName() {
        return toOrgName.trim().replaceAll("，",",");
    }

    private Long toServerZoneId;
    /**
     * 目的运点
     */
    @NotBlank(message = "目的运点不能为空")
    @Excel(name = "目的运点", prompt = "必须是 昆明市,呈贡区(县),大渔街道(乡镇) 相似的格式，从 州市 一级开始，使用英文逗号隔开,如果地址是到乡镇，则必须到乡镇级别，数据参考 系统内行政区划")
    private String toServerZoneIdName;

    public String getToServerZoneIdName() {
        return toServerZoneIdName.trim().replaceAll("，",",");
    }

    /**
     * 收入数量价格
     */
    @NotNull(message = "收入数量价格不能为空")
    @ApiModelProperty("收入数量价格")
    @Excel(name = "收入数量价格")
    private BigDecimal incomeNumPrice = BigDecimal.ZERO;


    /**
     * 收入价格(按重量)
     */
    @ApiModelProperty("收入价格(按重量)")
    @Excel(name = "收入价格(按重量)")
    private BigDecimal incomeWeightPrice = BigDecimal.ZERO;

    /**
     * 冷藏箱20升含以下
     */
    @ApiModelProperty("冷藏箱20升含以下")
    @Excel(name = "冷藏箱20升含以下")
    private BigDecimal incomeFreezer0 = BigDecimal.ZERO;

    /**
     * 冷藏箱21升-60升以下
     */
    @ApiModelProperty("冷藏箱21升-60升以下")
    @Excel(name = "冷藏箱21升-60升以下")
    private BigDecimal incomeFreezer21 = BigDecimal.ZERO;

    /**
     * 冷藏箱61升含以上
     */
    @ApiModelProperty("冷藏箱61升含以上")
    @Excel(name = "冷藏箱61升含以上")
    private BigDecimal incomeFreezer61 = BigDecimal.ZERO;

    /**
     * 干线支出数量价格
     */
    @NotNull(message = "干线支出数量价格不能为空")
    @Excel(name = "干线支出数量价格")
    private BigDecimal trunkNumPrice = BigDecimal.ZERO;

    /**
     * 干线支出价格(按重量)
     */
    @Excel(name = "干线支出价格(按重量)")
    private BigDecimal trunkWeightPrice = BigDecimal.ZERO;

    /**
     * 冷藏箱20升含以下
     */
    @Excel(name = "市县冷藏箱20升含以下")
    private BigDecimal trunkFreezer0 = BigDecimal.ZERO;

    /**
     * 冷藏箱21升-60升以下
     */
    @Excel(name = "市县冷藏箱21升-60升以下")
    private BigDecimal trunkFreezer21 = BigDecimal.ZERO;

    /**
     * 冷藏箱61升含以上
     */
    @Excel(name = "市县冷藏箱61升含以上")
    private BigDecimal trunkFreezer61 = BigDecimal.ZERO;

    /**
     * 支线配送数量价格
     */
    @NotNull(message = "支线配送数量价格不能为空")
    @Excel(name = "支线配送数量价格")
    private BigDecimal regionalNumPrice = BigDecimal.ZERO;


    /**
     * 支线配送价格(按重量)
     */
    @Excel(name = "支线配送价格(按重量)")
    private BigDecimal regionalWeightPrice = BigDecimal.ZERO;

    /**
     * 冷藏箱20升含以下
     */
    @Excel(name = "乡镇冷藏箱20升含以下")
    private BigDecimal regionalFreezer0 = BigDecimal.ZERO;

    /**
     * 冷藏箱21升-60升以下
     */
    @Excel(name = "乡镇冷藏箱21升-60升以下")
    private BigDecimal regionalFreezer21 = BigDecimal.ZERO;

    /**
     * 冷藏箱61升含以上
     */
    @Excel(name = "乡镇冷藏箱61升含以上")
    private BigDecimal regionalFreezer61 = BigDecimal.ZERO;

    /**
     * 取货费
     */
    @ApiModelProperty("取货费")
    @Excel(name = "取货费")
    private BigDecimal pickupPrice = BigDecimal.ZERO;

    /**
     * 其他支出价格
     */
    @ApiModelProperty("其他支出价格")
    @Excel(name = "其他支出价格")
    private BigDecimal otherSpendPrice = BigDecimal.ZERO;

}
